4597a824a38a366ff48a6579a0a4d1d507ae2b59,weld/src/main/java/org/jboss/as/weld/deployment/processors/BeanDefiningAnnotationProcessor.java,BeanDefiningAnnotationProcessor,deploy,#DeploymentPhaseContext#,38

Before Change


        addAnnotation(deploymentUnit, new AnnotationType(FLOW_SCOPED_NAME, true));

        addAnnotations(deploymentUnit, getAnnotationsAnnotatedWith(index, CdiAnnotations.NORM_SCOPE.getDotName()));
        addAnnotations(deploymentUnit, getAnnotationsAnnotatedWith(index, CdiAnnotations.SCOPE));
    }

    private static void addAnnotations(final DeploymentUnit deploymentUnit, Collection<AnnotationType> annotations) {

After Change



    @Override
    public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        if (deploymentUnit.getParent() != null) {
            return; // only run for top-level deployments
        }

        final CompositeIndex index = deploymentUnit.getAttachment(Attachments.COMPOSITE_ANNOTATION_INDEX);

        // CDI built-in normal scopes plus @Dependent
        addAnnotations(deploymentUnit, CdiAnnotations.BEAN_DEFINING_ANNOTATIONS);
        // CDI @Model stereotype
        addAnnotation(deploymentUnit, new AnnotationType(CdiAnnotations.MODEL.getDotName(), false));
        // EE7 built-in normal scopes and stereotypes
        addAnnotation(deploymentUnit, new AnnotationType(TransactionScoped.class));
        addAnnotation(deploymentUnit, new AnnotationType(VIEW_SCOPED_NAME, true));
        addAnnotation(deploymentUnit, new AnnotationType(FLOW_SCOPED_NAME, true));

        for (AnnotationType annotationType : CdiAnnotations.BEAN_DEFINING_META_ANNOTATIONS) {
            addAnnotations(deploymentUnit, getAnnotationsAnnotatedWith(index, annotationType.getName()));
        }
    }